# -*- coding: utf-8 -*-

"""
@Datetime: 2019/1/29
@Author: Zhang Yafei
"""
import os

SERVER_PORT = 8999
DEBUG = True
SQLALCHEMY_ECHO = False
JSON_AS_ASCII = False  # json数据中文显示正确

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


INSTALLED_APPS = (
    'BeautifulData',
)


SECRET_KEY = 'assadadsadsddadasda'

FILE_PATH = (
        ['label.xlsx', 'BeautifulData/file/three_people_same_label.xlsx'],
        ['drug_name.csv', 'BeautifulData/file/drug_name.csv'],
        ['drug_dict.xlsx', 'BeautifulData/file/drug_dict.xlsx'],
        ['unique_chinese_name.csv', 'BeautifulData/file/unique_chinese_name.csv'],
)

DATABASES = {
    # 'mysql': "mysql://root:0000@127.0.0.1:3306/flask_test?charset=utf8",
    'sqlite3': os.path.join(BASE_DIR, 'db.sqlite3'),
    # 'mongo':{
    #     'MONGO_URI': 'localhost',
    #     'MONGO_DB': 'flask',
    # },
}


AUTH_COOKIE_NAME = 'beautiful_data'

# ## 过滤url
IGNORE_URLS = [
    '/account/login'
]

IGNORE_CHECK_LOGIN_URLS = [
    '^/static',
    '^/favicon.ico'
]
# PAGE_SIZE = 50
# PAGE_DISPLAY = 10

STATUS_MAPPING = {
    '1': '正常',
    '0': '已删除',
}

MENUS = {
    '文件列表': '/file_list',
    '数据表管理': '/kingadmin/table_list',
    '账户管理': '/account/index',
    '数据统计': '/data_stat',
}

